package com.example.demo.Util;

import com.example.demo.model.User;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created by xiebang
 * Description
 * User:小谢
 * Date:2022-09-20
 * Time:17:39
 */
@Component
public class UserUtil {
    @Autowired
    private UserService userService;
//    判断用户是否存在 true 存在 faLse 不存在
    public User UserIsExist(String username){
        return userService.selectByName(username);
    }


}
